package com.edu.demo.service;

import com.edu.demo.entity.Sign;
import com.baomidou.mybatisplus.extension.service.IService;
import com.edu.demo.exception.MyNullPointerException;
import com.edu.demo.exception.UpdateErrorException;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 签到表 服务类
 * </p>
 *
 * @author jixuewei
 * @since 2023-01-12
 */
public interface ISignService extends IService<Sign> {
    /**
     * 查询某一天是否存在签到记录
     * @param stuId
     * @param date
     * @return
     */
    Sign selectByDateAndStuId(Integer stuId, Date date);

    /**
     * 签到中午和下午
     * @param sign
     * @return
     */
    boolean updateSign(Sign sign) throws UpdateErrorException;


    /**
     * 查询某个项目date的签到
     * @param date
     * @param projectId
     * @return
     */
    List<Sign> thisMonth(Date date, Integer projectId)throws MyNullPointerException;


}
